1. Field of the Invention
The present invention relates to an image processing apparatus and method, and a recording medium storing a program for executing the image processing method. More particularly, the present invention relates to an image processing apparatus and method for effectively and quickly reducing noise even in images processed by apparatuses having a low hardware specification, and a recording medium storing a program for executing the image processing method.
2. Description of the Related Art
In general, image processing apparatuses reproduce an image file stored in a storage medium and display an image from image data on a display unit. Digital photographing apparatuses, which are a type of image processing apparatus, photograph a subject in a shooting mode, store image data regarding the subject in a storage medium, reproduce an image file from the storage medium, and display an image from the image data on a display unit.
If the image data stored in the storage medium contains noise, the noise is also displayed on the display unit when the image file is reproduced, and the image from the image data is displayed on the display unit, thereby degrading the quality of the displayed image. Thus, the image needs to be displayed on the display unit so that the noise is not present in the image from the image data or the image data needs to be basically processed. In particular, if the image data is obtained by a digital photographing apparatus which is a type of image processing apparatus, the image data needs to be processed so that the noise is not present in the image from the image data and then stored in the storage medium.
FIG. 1 is a conceptual diagram illustrating an image Im including a total of 81 pixels (9×9 matrix). In FIG. 1, P(x,y) represents a pixel at a position (x,y). Noise may be included in the image Im. FIG. 2A is a conceptual diagram illustrating an image including small sized noises N1, N2, and N3. FIG. 2B is a conceptual diagram for explaining the size of a filter for reducing the noises N1, N2, and N3 in the image of FIG. 2A. Referring to FIGS. 1 and 2A, the noise N1 spreads over pixels P(6,4), P(6,5), P(7,4), and P(7,5). This means that data of each of the pixels P(6,4), P(6,5), P(7,4), and P(7,5) contains noise data but does not mean that the noise N1 is shaped as shown in FIG. 2A.
A noise reduction filter, e.g., a bilateral filter (BF), is used in order to reduce the noises N1, N2, and N3. In the case of the BF, the noise data is averaged out to zero by averaging or weighted averaging data values of neighboring pixels because the distribution of the noise data generally follows a normal distribution. In order to reduce the noises N1, N2, and N3 by using the BF, the BF needs to be applied to an area having a size equal to or greater than the size of each of the noises N1, N2, and N3 as shown in FIG. 2B because the noise data can be averaged out to zero by the BF only when the BF is applied to the area having such a size.
FIG. 3A is a conceptual diagram illustrating an image having large sized noises N1 and N2, and FIG. 3B is a conceptual diagram for explaining the size of a filter for reducing the noises N1 and N2 of FIG. 3A. In order to average out noise data by using a BF, the BF needs to be applied to an area having a size equal to or greater than that of each of the noises N1 and N2 as described above. Accordingly, the BF needs to be applied to an area having a size greater than the larger one of a size S1 of the noise N1 and a size S2 of the noise N2 as shown in FIG. 3B. If the BF has a size less than each of the sizes S1 and S2 of the noises N1 and N2, the noises N1 and N2 cannot be reduced effectively, thereby failing to improve image quality. Therefore, when the sizes of the noises N1 and N2 are large, the size of the BF should also be increased.
Once the size of the BF is increased, however, the BF can reduce the noises N1 and N2 in the final image but data corresponding to an edge of a subject in the final image is damaged, thereby degrading image resolution. Also, once the size of the BF is increased, the amount of calculation performed by an image processing apparatus is increased sharply and a time taken to process the image is increased accordingly, thereby causing inconvenience to users. The hardware of the image processing apparatus is be increased as well in order to perform the increased amount of calculation.